#ifndef AFX_SvrNetRPUdpItem_H__INCLUDED_
#define AFX_SvrNetRPUdpItem_H__INCLUDED_


#include "SvrNetRPItem.h"


#define TG_ITEM_MAXCOMMAND 5

class SvrNetRPUdpItem : public SvrNetRPItem
{
public:
	SvrNetRPUdpItem(void);
	~SvrNetRPUdpItem(void);

public:
	virtual int Initialize(NET_PACKET_HEAD *pRetMsgHead);
	virtual int UnInitialize();

private:
	virtual int DDThdDispatch();

private:
	void InitializeNetCmd();
	void UnInitializeNetCmd();
	void CheckRetransPacket(NET_PACKET &xRetransPacket);
	BOOL GetCmdRetransPacket(NET_PACKET &xRetransPacket);

private:
	virtual int SetCmdRetransPacket(NET_PACKET *pPacket);
	virtual int KeepAlive();

private:
	int ReTranslatePacket( UINT8 *pBuffer,UINT16 nSize );
	
public:
	

private:
	DDCriticalSection m_RetransSect;

private:
	NET_PACKET_NODE  m_xNetCommand[TG_ITEM_MAXCOMMAND];
	NET_PACKET_NODE *m_pWriteCmdNode;        //д����� 
	NET_PACKET_NODE *m_pReadCmdNode;         //��

};


#endif
